﻿@page "/code-editors"
@inject IStringLocalizer<CodeEditors> Localizer

<h3>@Localizer["Title"]</h3>

<PackageTips Name="BootstrapBlazor.CodeEditor"></PackageTips>

<DemoBlock Title="@Localizer["BasicTitle"]" Introduction="@Localizer["BasicIntro"]">
    <div class="row form-inline g-3">
        <div class="col-12 col-sm-6">
            <Select TValue="string" OnSelectedItemChanged="@OnSelectedItemChanged" ShowLabel="true" DisplayText="Language">
                <Options>
                    <SelectOption Text="JavaScript" Value="javascript"></SelectOption>
                    <SelectOption Text="CSharp" Value="csharp"></SelectOption>
                    <SelectOption Text="Razor" Value="razor"></SelectOption>
                    <SelectOption Text="Json" Value="json"></SelectOption>
                </Options>
            </Select>
        </div>
        <div class="col-12 col-sm-6">
            <Select TValue="string" OnSelectedItemChanged="@OnThemeSelectedItemChanged" ShowLabel="true" DisplayText="Theme">
                <Options>
                    <SelectOption Text="Visual Studio" Value="vs"></SelectOption>
                    <SelectOption Text="Visual Studio Dark" Value="vs-dark"></SelectOption>
                    <SelectOption Text="High Contrast Dark" Value="hc-black"></SelectOption>
                </Options>
            </Select>
        </div>
        <div class="col-12">
            <Pre>&lt;CodeEditor Value="@@Code" Language="@@Language" Theme="@@Theme" OnValueChanged="OnValueChanged" /&gt;</Pre>
        </div>
    </div>
</DemoBlock>

<AttributeTable Items="GetAttributeItems()" />
